@red: #e93030;
@green: #009900;
@blue: #4295f2;
@orange: #ff801a;
@border: #eee;
@gray: #999;
@tabGray: #666;
@bg: #f5f5f5;

@font-face {
  font-family: 'DIN';
  src: url('//s.thsi.cn/css/m/fonts/dinstock.ttf');
}

.set_px(@css_name, @px_num, @dpr: 4) when (@dpr > 0) {
  .set_px(@css_name, @px_num, (@dpr - 1));

  [data-dpr='@{dpr}'] & {
    @{css_name}: unit(@dpr* @px_num, px);
  }
}

//上三角形
.triangleUp(@w: 4.5, @color: #ccc) {
  display: inline-block;
  width: 0;
  height: 0;
  border-top-width: 0;
  .set_px(border-left-width, @w);
  .set_px(border-right-width, @w);
  .set_px(border-bottom-width, @w);
  border-style: solid;
  border-color: transparent transparent @color;
}

//旋转
.rotate(@angle) {
  transform: rotate(@angle);
  -webkit-transform: rotate(@angle);
}

//下三角形
.triangleDown(@w: 4.5, @color: #ccc) {
  .triangleUp(@w, @color: #ccc);
  .rotate(180deg);
}

//右三角形
.triangleLeft(@w: 4.5, @color: #ccc) {
  .triangleUp(@w, @color: #ccc);
  .rotate(90deg);
}

.red {
  color: @red;
}

.green {
  color: @green;
}

.bold {
  font-weight: 700;
}

.border(@color: @border) {
  border-bottom: solid 1px @color;
}

// 设置图片背景
.bgimg(@url) {
  background: url(@url) no-repeat;
  background-size: 100% 100%;
}

// 根据位置设置图片背景
.bgimgpos(@url, @left, @top, @w, @h) {
  background: url(@url);
  background: url(@url);
  background-size: @w @h;
  background-position: @left @top;
}

/* 父元素-flex容器 */
.flex {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

/* 父元素-纵向排列（主轴） */
.flex-v {
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
}

/* 父元素-竖直居中（主轴是横向才生效） */
.flex-vc {
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

/* 父元素-水平居中（主轴是横向才生效） */
.flex-hc {
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

/* 子元素-平均分栏 */
.flex1 {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

/* 子元素-两边靠 */
.flex-sb {
  -webkit-box-pack: justify;
  justify-content: space-between;
  -webkit-justify-content: space-between;
}

#vuewrap {
  background: #fff;

  .dot3 {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .limitStockDetail {
    h4 {
      background: @bg;
      line-height: 1;
      padding: 0 0.3rem;
      font-size: 0.24rem;
      padding-top: 0.25rem;
      padding-bottom: 0.12rem;

      span {
        display: inline-block;
      }

      span:nth-of-type(1) {
        float: left;
      }

      span:nth-of-type(2) {
        float: right;
      }
    }

    .shadow {
      box-shadow: 0.12rem 0.06rem 0.12rem 0 rgba(0, 0, 0, 0.06);
    }

    .replaceShadow {
      border-right: solid 1px @border;
    }

    .empty {
      img {
        width: 2.22rem;
        height: 1.93rem;
        display: inline-block;
        margin-top: 0.3rem;
        margin-bottom: 0.2rem;
      }

      p {
        padding-bottom: 0.2rem;
      }

      font-size: 0.32rem;
      text-align: center;
    }

    .list {
      .list-r {

        .titleWrap,
        .stockWrap {
          width: 19rem;
        }

        .titleWrap {
          .rel {
            width: 9.06%;
          }

          .rel-6 {
            width: 11%;
          }

          .rel-s1 {
            width: 5.5%;
          }
        }

        .stockWrap {
          .stock {
            li {
              width: 9.06%;
            }

            .rel-6 {
              width: 11%;
            }

            .rel-s1 {
              width: 5.5%;
            }
          }
        }
      }
    }

    .list {
      padding: 0 0.25rem;
      position: relative;

      .smallTriangle {
        position: absolute;
        right: 0.08rem;
        top: 0.3rem;
        .triangleLeft;
      }

      .list-l {
        float: left;
        width: 25.75%;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;

        .titleWrap {
          width: 100%;

          .title {
            height: 0.72rem;
            border-bottom: solid 1px @border;

            li {
              text-align: left;
              line-height: 0.24rem;
              float: left;
              margin: 0.24rem 0;
              font-size: 0.26rem;
              color: @gray;

              span {
                height: 0.24rem;
                line-height: 0.24rem;
                float: left;
              }
            }
          }
        }

        .stockWrap {
          width: 100%;

          .stock {
            height: 0.96rem;
            border-bottom: solid 1px @border;

            li {
              width: 100%;
              float: left;
              font-size: 0.32rem;
              height: 0.96rem;
              line-height: 0.96rem;
              text-align: right;
            }

            li:nth-of-type(1) {
              text-align: left;
              position: relative;

              .name {
                position: absolute;
                height: 0.3rem;
                line-height: 0.3rem;
                width: 100%;
                display: inline-block;
                left: 0;
                top: 0.18rem;
              }

              .code {
                position: absolute;
                height: 0.24rem;
                line-height: 0.24rem;
                width: 100%;
                font-size: 0.24rem;
                color: @gray;
                display: inline-block;
                left: 0;
                bottom: 0.18rem;
              }
            }
          }
        }
      }

      .list-r {
        width: 74.25%;
        -webkit-overflow-scrolling: touch;
        overflow: scroll;
        float: right;

        &::-webkit-scrollbar {
          display: none;
        }

        .titleWrap {
          .title {
            width: 100%;
            height: 0.72rem;
            font-size: 0.26rem;
            color: @gray;
            border-bottom: solid 1px #eee;

            li {
              text-align: left;
              line-height: 0.24rem;
              float: left;
              margin-top: 0.24rem;
              margin-bottom: 0.24rem;
              font-size: 0.26rem;

              span {
                height: 0.24rem;
                line-height: 0.24rem;
                float: right;
              }
            }

            .rel {
              .triangle {
                position: relative;
                width: 0.14rem;
                height: 0.26rem;
                margin-left: 0.08rem;
                box-sizing: border-box;
                float: right;

                .up,
                .down {
                  position: absolute;
                }

                .up {
                  top: 0.02rem;
                  left: 0;
                  .triangleUp;
                }

                .down {
                  left: 0;
                  bottom: 0.02rem;
                  .triangleDown;
                }

                .active {
                  border-color: transparent transparent #e93030;
                }
              }
            }
          }
        }

        .stockWrap {
          .stock {
            height: 0.96rem;
            border-bottom: solid 1px @border;

            .hq {
              font-size: 0.32rem;
              font-family: 'DIN';
            }

            .fontsize28 {
              font-size: 0.28rem;
            }

            li {
              float: left;
              font-size: 0.32rem;
              height: 0.96rem;
              line-height: 0.96rem;
              text-align: right;
            }
          }
        }
      }
    }
  }
}